Carbon


PBUnmountVol

Header: Files.h Carbon status: Supported

Unmounts a volume.

OSErr PBUnmountVol (
    ParmBlkPtr paramBlock
);
Parameter descriptions
paramBlock

A pointer to a basic File Manager parameter block.

function result

A result code.

DISCUSSION

The relevant fields of the parameter block are:

The PBUnmountVol function unmounts the specified volume. All user files on the volume must be closed. Then, PBUnmountVol calls PBFlushVolSync or PBFlushVolAsync to flush the volume and releases the memory used for the volume.

Unmounting a volume does not close working directories; to release the memory allocated to a working directory, call PBCloseWDSync or PBCloseWDAsync.

The PBUnmountVol function always executes synchronously.

SPECIAL CONSIDERATIONS

Don’t unmount the startup volume. Doing so will cause a system crash.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)